import React, { Component } from 'react'
import Film from './component/Film'
import Cinema from './component/Cinema'
import Center from './component/Center'
import Tab from './component/tab'
export default class App extends Component {
    state = {
    }
    which() {
        switch (this.state.current) {
            case 0:
                return <Film></Film>
            case 1:
                return <Cinema></Cinema>
            case 2:
                return <Center></Center>
                default: 
                return null
        }
    }
    render() {
        return (
            <div>
                {
                    this.which()
                }
               <Tab event={(index)=>{this.setState({current: index})}}></Tab>
            </div>
        )
    }

}
